<?php

use yii\helpers\Html;


/* @var $this yii\web\View */
/* @var $model backend\modules\pooai\models\ZpooaiPages */

$this->title = Yii::t('app', '修改广告分类');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', '属性广告管理'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$this->registerCssFile('@web/css/admin.css');
$this->registerCssFile('@web/css/jquery.dad.css');
$this->registerJsFile('@web/js/jquery.dad.min.js');
?>
<div class="zpooai-pages-create" style="background-color: white;width: 100%;height: 100%;">
    <div class="zpooai-pages-form" >
        <div class="nav-ul-li">
            <ul class="nav-ul">
                <li id="aPage01" class="nav-li nav-li-active" style="margin-left:0px !important;">
                    <a  data-toggle="tab"><i class="glyphicon glyphicon-th-large"></i>基本信息</a>
                </li>
            </ul>
        </div>

        <div class="page-data-form" >
            <?= $this->render('_form', [
                'model' => $model,
                'FormPage'=>$FormPage
            ]) ?>
        </div>
    </div>
</div>

<script>
    $('.nav-li').mouseover(function(){
        $(this).css('background-color','rgb(250,250,250)')
    });
    $('.nav-li').mouseout(function(){
        $(this).css('background-color','rgb(245,245,245)')
    });
    $('.nav-li').click(function(){
        $('.nav-li').removeClass('nav-li-active');
        $(this).addClass('nav-li-active');

        var pageNumber = $(this)[0].id;
        if(pageNumber=='aPage01') {
            $('.FormPage05').css("display","none");
            $('.FormPage04').css("display","none");
            $('.FormPage03').css("display","none");
            $('.FormPage02').css("display","none");
            $('.FormPage01').css("display","block");
            $('#form-group-submit-btn').css("display","block");

        }

    });

    var FormPageType= $('#FormPageType').val();
    switch (FormPageType){
        case 'FormPage01':
            $('.nav-li').removeClass('nav-li-active');
            $('#aPage01').addClass('nav-li-active');
            $('.FormPage05').css("display","none");
            $('.FormPage04').css("display","none");
            $('.FormPage03').css("display","none");
            $('.FormPage02').css("display","none");
            $('.FormPage01').css("display","block");
            $('#form-group-submit-btn').css("display","block");
            break;
    }



</script>

